import numpy as np
from utils.utils_metrics import compute_mIoU

if __name__ == '__main__':
    print("Calculate miou.")

    image_ids = [str(i) for i in range(1, 1241)]
    _, IoUs, _, _ = compute_mIoU('./datasets/crop_masks_test', './img_out', image_ids, 2, None)  # 执行计算mIoU的函数
    temp_miou = np.nanmean(IoUs) * 100
